<?php
$user = $_GET['user'];
$dir = dirname(__FILE__)."/users/".$user."/uploads/";
$file = $dir.basename($_FILES['uploadfile']['name']); 
$size=$_FILES['uploadfile']['size'];
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) { 
	echo "success"; 
} else {
	echo "error ".$_FILES['uploadfile']['error']." --- ".$_FILES['uploadfile']['tmp_name']." %%% ".$file."($size)";
}
?>
